<?
function format_date_for_input($date)
{
	if($date == '0000-00-00')
	{return NULL;}
	$date =  DateTime::createFromFormat('Y-m-d',$date);
	return $date !== FALSE ? $date->format('m/d/Y') : NULL;
};

$genderAttrib = array('male'=>'Male','female'=>'female');
$email = set_value('email',$student->email);
$child_fname = set_value('child_fname',$student->firstname);
$child_mname = set_value('child_mname',$student->middlename);
$child_lname = set_value('child_lname',$student->lastname);
$child_nickname = set_value('child_nickname',$student->nickname);
$child_name_ext = set_value('child_name_ext',$student->name_ext);
$child_placeofbirth = set_value('child_placeofbirth',$student->pob);
$child_bdate = set_value('child_bdate',format_date_for_input($student->dob));
$gender = set_value('gender',$student->gender);
$child_religous = set_value('child_religous',$student->religion);
$child_nationality = set_value('child_nationality',$student->nationality);
$nationality_ssp_number = set_value('nationality_ssp_number',$student->f_ssp_status);
$nationality_visa_status = set_value('nationality_visa_status',$student->f_visa_status);
$nationality_auth_stay = set_value('nationality_auth_stay',$student->f_authorized_stay);
$nationality_passport_no = set_value('nationality_passport_no',$student->f_passport_no);
$nationality_icard_no = set_value('nationality_icard_no',$student->f_i_card_no);
$nationality_date_issued = set_value('nationality_date_issued',format_date_for_input($student->f_date_if_issue));
$child_city_address = set_value('child_city_address',$student->present_address);
$child_telno = set_value('child_telno',$student->contact_no);
$child_adresshowlong = set_value('child_adresshowlong',$student->how_long_living_present_address);
$school_last_attended = set_value('school_last_attended',$student->last_school_name);
$school_level_completed = set_value('school_level_completed',$student->last_school_level);
$school_address = set_value('school_address',$student->last_school_address);
$father_name = set_value('father_name',$student->fathername);
$father_age = set_value('father_age',$student->father_age);
$father_citizenship = set_value('father_citizenship',$student->father_nationality);
$father_educ = set_value('father_educ',$student->father_educ_attain);
$father_talent = set_value('father_talent',$student->father_hobby_talent);
$father_occup = set_value('father_occup',$student->father_occupation);
$father_office_address = set_value('father_office_address',$student->father_office_add);
$father_office_tel = set_value('father_office_tel',$student->father_office_num);
$mother_name = set_value('mother_name',$student->mothername);
$mother_age = set_value('mother_age',$student->mother_age);
$mother_citizenship = set_value('mother_citizenship',$student->mother_nationality);
$mother_educ = set_value('mother_educ',$student->mother_educ_attain);
$mother_talent = set_value('mother_talent',$student->mother_hobby_talent);
$mother_occup = set_value('mother_occup',$student->mother_occupation);
$mother_office_address = set_value('mother_office_address',$student->mother_office_add);
$mother_office_tel = set_value('mother_office_tel',$student->mother_office_num);
$guardian_name = set_value('guardian_name',$student->guardian_name);
$guardian_relation = set_value('guardian_relation',$student->relationship);
$guardian_address = set_value('guardian_address',$student->guardian_address);
$guardian_contact_num = set_value('guardian_contact_num',$student->guardian_contact_no);
$guardian_reason = set_value('guardian_reason',$student->guardian_reason);

$age_first_walked = set_value('',$student->preschool_age_first_walked);
$age_first_talked = set_value('',$student->preschool_age_first_talked);
$w_for_urinate = set_value('',$student->preschool_w_for_urinate);
$w_for_bowel = set_value('',$student->preschool_w_for_bowel);
$w_usual_time = set_value('',$student->preschool_w_usual_time);
$child_dress = set_value('',$student->preschool_child_dress);
$child_undress = set_value('',$student->preschool_child_undress);
$hand_orientation = set_value('',$student->preschool_hand_orientation);
$self_feed = set_value('',$student->preschool_self_feed);
$stayinplace = set_value('',$student->preschool_stayinplace);
$joinothereating = set_value('',$student->preschool_joinothereating);
$food_preferences = set_value('',$student->preschool_food_preferences);
$drink_from_bottle = set_value('',$student->preschool_drink_from_bottle);
$toilet_trained = set_value('',$student->preschool_toilet_trained);

//CHECK if value updated , if yes check if approve, denied  or pending
/*
 * Function located at parent_helper
 */

$profile_request = isset($profile_request) ? $profile_request : false;
$req_id = isset($req_id) ? $req_id : 0;

$is_email = req_check_if_updated($req_id, 'email',$student->email, $profile_request);
$is_child_fname = req_check_if_updated($req_id, 'firstname',$student->firstname, $profile_request);
$is_child_mname = req_check_if_updated($req_id, 'middlename',$student->middlename, $profile_request);
$is_child_lname = req_check_if_updated($req_id, 'lastname',$student->lastname, $profile_request);
$is_child_nickname = req_check_if_updated($req_id, 'nickname',$student->nickname, $profile_request);
$is_child_name_ext = req_check_if_updated($req_id, 'name_ext',$student->name_ext, $profile_request);
$is_child_placeofbirth = req_check_if_updated($req_id, 'pob',$student->pob, $profile_request);
$is_child_bdate = req_check_if_updated($req_id, 'dob',($student->dob), $profile_request);
$is_gender = req_check_if_updated($req_id, 'gender',$student->gender, $profile_request);
$is_child_religous = req_check_if_updated($req_id, 'religion',$student->religion, $profile_request);
$is_child_nationality = req_check_if_updated($req_id, 'nationality',$student->nationality, $profile_request);
$is_nationality_ssp_number = req_check_if_updated($req_id, 'f_ssp_status',$student->f_ssp_status, $profile_request);
$is_nationality_visa_status = req_check_if_updated($req_id, 'f_visa_status',$student->f_visa_status, $profile_request);
$is_nationality_auth_stay = req_check_if_updated($req_id, 'f_authorized_stay',$student->f_authorized_stay, $profile_request);
$is_nationality_passport_no = req_check_if_updated($req_id, 'f_passport_no',$student->f_passport_no, $profile_request);
$is_nationality_icard_no = req_check_if_updated($req_id, 'f_i_card_no',$student->f_i_card_no, $profile_request);
$is_nationality_date_issued = req_check_if_updated($req_id, 'f_date_if_issue',($student->f_date_if_issue), $profile_request);
$is_child_city_address = req_check_if_updated($req_id, 'present_address',$student->present_address, $profile_request);
$is_child_telno = req_check_if_updated($req_id, 'contact_no',$student->contact_no, $profile_request);
$is_child_adresshowlong = req_check_if_updated($req_id, 'how_long_living_present_address',$student->how_long_living_present_address, $profile_request);
$is_school_last_attended = req_check_if_updated($req_id, 'last_school_name',$student->last_school_name, $profile_request);
$is_school_level_completed = req_check_if_updated($req_id, 'last_school_level',$student->last_school_level, $profile_request);
$is_school_address = req_check_if_updated($req_id, 'last_school_address',$student->last_school_address, $profile_request);
$is_father_name = req_check_if_updated($req_id, 'fathername',$student->fathername, $profile_request);
$is_father_age = req_check_if_updated($req_id, 'father_age',$student->father_age, $profile_request);
$is_father_citizenship = req_check_if_updated($req_id, 'father_nationality',$student->father_nationality, $profile_request);
$is_father_educ = req_check_if_updated($req_id, 'father_educ_attain',$student->father_educ_attain, $profile_request);
$is_father_talent = req_check_if_updated($req_id, 'father_hobby_talent',$student->father_hobby_talent, $profile_request);
$is_father_occup = req_check_if_updated($req_id, 'father_occupation',$student->father_occupation, $profile_request);
$is_father_office_address = req_check_if_updated($req_id, 'father_office_add',$student->father_office_add, $profile_request);
$is_father_office_tel = req_check_if_updated($req_id, 'father_office_num',$student->father_office_num, $profile_request);
$is_mother_name = req_check_if_updated($req_id, 'mothername',$student->mothername, $profile_request);
$is_mother_age = req_check_if_updated($req_id, 'mother_age',$student->mother_age, $profile_request);
$is_mother_citizenship = req_check_if_updated($req_id, 'mother_nationality',$student->mother_nationality, $profile_request);
$is_mother_educ = req_check_if_updated($req_id, 'mother_educ_attain',$student->mother_educ_attain, $profile_request);
$is_mother_talent = req_check_if_updated($req_id, 'mother_hobby_talent',$student->mother_hobby_talent, $profile_request);
$is_mother_occup = req_check_if_updated($req_id, 'mother_occupation',$student->mother_occupation, $profile_request);
$is_mother_office_address = req_check_if_updated($req_id, 'mother_office_add',$student->mother_office_add, $profile_request);
$is_mother_office_tel = req_check_if_updated($req_id, 'mother_office_num',$student->mother_office_num, $profile_request);
$is_guardian_name = req_check_if_updated($req_id, 'guardian_name',$student->guardian_name, $profile_request);
$is_guardian_relation = req_check_if_updated($req_id, 'relationship',$student->relationship, $profile_request);
$is_guardian_address = req_check_if_updated($req_id, 'guardian_address',$student->guardian_address, $profile_request);
$is_guardian_contact_num = req_check_if_updated($req_id, 'guardian_contact_no',$student->guardian_contact_no, $profile_request);
$is_guardian_reason = req_check_if_updated($req_id, 'guardian_reason',$student->guardian_reason, $profile_request);

$is_age_first_walked = req_check_if_updated($req_id, 'preschool_age_first_walked',$student->preschool_age_first_walked, $profile_request);
$is_age_first_talked = req_check_if_updated($req_id, 'preschool_age_first_talked',$student->preschool_age_first_talked, $profile_request);
$is_w_for_urinate = req_check_if_updated($req_id, 'preschool_w_for_urinate',$student->preschool_w_for_urinate, $profile_request);
$is_w_for_bowel = req_check_if_updated($req_id, 'preschool_w_for_bowel',$student->preschool_w_for_bowel, $profile_request);
$is_w_usual_time = req_check_if_updated($req_id, 'preschool_w_usual_time',$student->preschool_w_usual_time, $profile_request);
$is_child_dress = req_check_if_updated($req_id, 'preschool_child_dress',$student->preschool_child_dress, $profile_request);
$is_child_undress = req_check_if_updated($req_id, 'preschool_child_undress',$student->preschool_child_undress, $profile_request);
$is_hand_orientation = req_check_if_updated($req_id, 'preschool_hand_orientation',$student->preschool_hand_orientation, $profile_request);
$is_self_feed = req_check_if_updated($req_id, 'preschool_self_feed',$student->preschool_self_feed, $profile_request);
$is_stayinplace = req_check_if_updated($req_id, 'preschool_stayinplace',$student->preschool_stayinplace, $profile_request);
$is_joinothereating = req_check_if_updated($req_id, 'preschool_joinothereating',$student->preschool_joinothereating, $profile_request);
$is_food_preferences = req_check_if_updated($req_id, 'preschool_food_preferences',$student->preschool_food_preferences, $profile_request);
$is_drink_from_bottle = req_check_if_updated($req_id, 'preschool_drink_from_bottle',$student->preschool_drink_from_bottle, $profile_request);
$is_toilet_trained = req_check_if_updated($req_id, 'preschool_toilet_trained',$student->preschool_toilet_trained, $profile_request);
?>



<div>
	<!-- start of Set SECTION-->
	<?if(!empty($student)):
		// $this->load->view('profile/_profile_links');
	?>

		<div class="row">
			<div class="">
			<div class="">
				<label>Student ID # and Username:</label>
				<input type="text" value="<?=$student->idno;?>" disabled>
			</div>
			
			<div class="">
				<label>Student Type:</label>
				<input type="text" value="<?=$student->student_type;?>" disabled>
			</div>
			<div class="">
				<label>Grade Level:</label>
				<input type="text" value="<?=$student->level_desc;?>" disabled>
			</div>
		</div>
	  </div>

		<!-- End of Set SECTION-->
	<div class="inner-border">
	<div class="row">
		<span class="clearfix"></span>
			<div class="alert-box secondary">Student Personal Information</div>
			<span class="clearfix"></span>
		
		<?=form_open('',' class="custom profile_form" id ="personal_information" ')?>
		<div class="large-8 columns">
			<label class="radius secondary label">
			Parent's Email Address
			</label>
			<?=form_error('email');?> <?=$is_email->checkbox?> <?=$profile_request?"(Editing this will not affect your parent login)":""?>
			<input class="<?=$is_email->changed?$is_email->class:''?>" type="email" name="email" value="<?=$email;?>" disabled>
		</div>
		<div class="clearfix"></div>
		
		<div class="large-4 columns">
			<label class="radius secondary label">First Name</label> <?=$is_child_fname->checkbox?>
			<?=form_error('child_fname');?> 
			<input class="<?=$is_child_fname->changed?$is_child_fname->class:''?>" type="text" name="child_fname" value="<?=$child_fname;?>" disabled>
		</div>
		<div class="large-4 columns">
			<label class="radius secondary label">Middle Name</label> <?=$is_child_mname->checkbox?>
			<?=form_error('child_mname');?> 
			<input class="<?=$is_child_mname->changed?$is_child_mname->class:''?>" type="text" name="child_mname" value="<?=$child_mname;?>" disabled>
		</div>
		<div class="large-4 columns">
			<label class="radius secondary label">Last Name</label> <?=$is_child_lname->checkbox?>
			<?=form_error('child_lname');?> 
			<input class="<?=$is_child_lname->changed?$is_child_lname->class:''?>" type="text" name="child_lname" value="<?=$child_lname;?>" disabled>
		</div>
		<div class="large-4 columns">
			<label class="radius secondary label">Nickname</label> <?=$is_child_nickname->checkbox?>
			<?=form_error('child_nickname');?> 
			<input class="<?=$is_child_nickname->changed?$is_child_nickname->class:''?>" type="text" name="child_nickname" value="<?=$child_nickname;?>" disabled>
		</div>
		<div class="large-4 columns">
			<label class="radius secondary label">Name Ext (e.g jr,II,III)</label> <?=$is_child_name_ext->checkbox?>
			<?=form_error('child_name_ext');?> 
			<input class="<?=$is_child_name_ext->changed?$is_child_name_ext->class:''?>" type="text" name="child_name_ext" value="<?=$child_name_ext;?>" disabled>
		</div>
		<div class="large-4 columns"> <?=$is_child_placeofbirth->checkbox?>
			<label class="radius secondary label">Place of Birth</label><?=form_error('child_placeofbirth');?>
			<input class="<?=$is_child_placeofbirth->changed?$is_child_placeofbirth->class:''?>" type="text" name="child_placeofbirth" value="<?=$child_placeofbirth;?>" disabled>
		</div>
		<div class="clearfix"></div>
		
		<div class="large-4 columns">
			<label class="radius secondary label">Childs Birthdate:</label> <?=$is_child_bdate->checkbox?>
			<?=form_error('child_bdate');?> 
			<input class="<?=$is_child_bdate->changed?$is_child_bdate->class:''?>" type="text" name="child_bdate" class="datepicker" value="<?=$child_bdate;?>" disabled>
		</div>
		<div class="large-4 columns">
			<label class="radius secondary label">Gender</label> <?=$is_gender->checkbox?>
			<?=form_error('gender');?> 
			<? $dd_class = $is_gender->changed ? $is_gender->class : '' ?>
			<?=form_dropdown('gender', $genderAttrib,$gender, " class='$dd_class' disabled ");?>
		</div>
		<div class="large-4 columns">
			<label class="radius secondary label">Religious Affiliation</label> <?=$is_child_religous->checkbox?>
			<?=form_error('child_religous');?> 
			<input class="<?=$is_child_religous->changed?$is_child_religous->class:''?>" type="text" name="child_religous" value="<?=$child_religous;?>" disabled>
		</div>
		<div class="clearfix"></div>
		<div>
			<span class="clearfix"></span>
			<div class="alert-box secondary">Nationality Information</div>
			<span class="clearfix"></span>
			<div class="large-4 columns">
				<label class="radius secondary label">Nationality</label> <?=$is_child_nationality->checkbox?>
				<input class="<?=$is_child_nationality->changed?$is_child_nationality->class:''?>" type="text" name="child_nationality" value="<?=$child_nationality;?>" disabled>
			</div>
			<?=form_error('child_nationality');?>
			<div class="clearfix"></div>
			<!-- <div>
				<label class="label secondary">For Foreign Students ONLY</label>
				<br class="clearfix">
				<div class="large-4 columns">
					<label class="radius secondary label">SSP Number</label> <?=$is_nationality_ssp_number->checkbox?>
					<?=form_error('nationality_ssp_number');?>
					<input class="<?=$is_nationality_ssp_number->changed?$is_nationality_ssp_number->class:''?>" type="text" name="nationality_ssp_number" value="<?=$nationality_ssp_number;?>">
				</div>
				<div class="large-4 columns">
					<label class="radius secondary label">VISA Status</label> <?=$is_nationality_visa_status->checkbox?>
					<?=form_error('nationality_visa_status');?> 
					<input class="<?=$is_nationality_visa_status->changed?$is_nationality_visa_status->class:''?>" type="text" name="nationality_visa_status" value="<?=$nationality_visa_status;?>">
				</div>
				<div class="large-4 columns">
					<label class="radius secondary label">Authorized Stay</label> <?=$is_nationality_auth_stay->checkbox?>
					<?=form_error('nationality_auth_stay');?> 
					<input class="<?=$is_nationality_auth_stay->changed?$is_nationality_auth_stay->class:''?>" type="text" name="nationality_auth_stay" value="<?=$nationality_auth_stay;?>">
				</div>
				<div class="large-4 columns">
					<label class="radius secondary label">Passport No.</label>  <?=$is_nationality_passport_no->checkbox?>
					<?=form_error('nationality_passport_no');?>
					<input <?=$is_nationality_passport_no->checkbox?> type="text" name="nationality_passport_no" value="<?=$nationality_passport_no;?>">
				</div>
				<div class="large-4 columns">
					<label class="radius secondary label">I-Card No.</label> <?=$is_nationality_icard_no->checkbox?>
					<?=form_error('nationality_icard_no');?> 
					<input class="<?=$is_nationality_icard_no->changed?$is_nationality_icard_no->class:''?>" type="text" name="nationality_icard_no" value="<?=$nationality_icard_no;?>">
				</div>
				<div class="large-4 columns">
					<label class="radius secondary label">Date of Issue</label>  <?=$is_nationality_date_issued->checkbox?>
					<?=form_error('nationality_date_issued');?>
					<input class="<?=$is_nationality_date_issued->changed?$is_nationality_date_issued->class:''?>" type="text" name="nationality_date_issued" class="datepicker" value="<?=$nationality_date_issued;?>">
				</div>
			</div> -->
		</div>
		<div>
			<span class="clearfix"></span>
			<div class="alert-box secondary">Current Address Information</div>
			<span class="clearfix"></span>
			<div  class="large-4 columns">
				<label class="radius secondary label">City Address</label> <?=$is_child_city_address->checkbox?>
				<?=form_error('child_city_address');?>
				<input class="<?=$is_child_city_address->changed?$is_child_city_address->class:''?>" type="text" name="child_city_address" value="<?=$child_city_address;?>">
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Telephone Number</label> <?=$is_child_telno->checkbox?>
				<?=form_error('child_telno');?>
				<input class="<?=$is_child_telno->changed?$is_child_telno->class:''?>" type="text" name="child_telno" value="<?=$child_telno;?>">
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">How Long has Child Lived in This Address?</label> <?=$is_child_adresshowlong->checkbox?>
				<?=form_error('child_adresshowlong');?>
				<input class="<?=$is_child_adresshowlong->changed?$is_child_adresshowlong->class:''?>" type="text" name="child_adresshowlong" value="<?=$child_adresshowlong;?>" disabled>
			</div>
		</div>

		
		<div>
			<span class="clearfix"></span>
			<div class="alert-box secondary">Recent School Information.</div>
			<span class="clearfix"></span>
			<div class="large-4 columns">
				<label class="radius secondary label">School Last Attended</label> <?=$is_school_last_attended->checkbox?>
				<?=form_error('school_last_attended');?>
				<input class="<?=$is_school_last_attended->changed?$is_school_last_attended->class:''?>" type="text" name="school_last_attended" value="<?=$school_last_attended;?>" disabled>
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">School Level Completed</label> <?=$is_school_level_completed->checkbox?>
				<?=form_error('school_level_completed');?>
				<input class="<?=$is_school_level_completed->changed?$is_school_level_completed->class:''?>" type="text" name="school_level_completed" value="<?=$school_level_completed;?>" disabled>
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Address Of School</label> <?=$is_school_address->checkbox?>
				<?=form_error('school_address');?>
				<input class="<?=$is_school_address->changed?$is_school_address->class:''?>" type="text" name="school_address" value="<?=$school_address;?>" disabled>
			</div>
		</div>
		<div>
			<span class="clearfix"></span>
			<div class="alert-box secondary">Father's Information</div>
			<span class="clearfix"></span>
			<div class="large-4 columns">
				<label class="radius secondary label">Father's Full Name</label> <?=$is_father_name->checkbox?>
				<?=form_error('father_name');?>
				<input class="<?=$is_father_name->changed?$is_father_name->class:''?>" type="text" name="father_name" value="<?=$father_name;?>" disabled>
			</div class="large-4 columns">
			<div class="large-2 columns">
				<label class="radius secondary label">Father's Age</label> <?=$is_father_age->checkbox?>
				<?=form_error('father_age');?>
				<input class="<?=$is_father_age->changed?$is_father_age->class:''?>" type="text" name="father_age" value="<?=$father_age;?>" disabled>
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Father's Citizenship:</label> <?=$is_father_citizenship->checkbox?>
				<?=form_error('father_citizenship');?>
				<input class="<?=$is_father_citizenship->changed?$is_father_citizenship->class:''?>" type="text" name="father_citizenship" value="<?=$father_citizenship;?>" disabled>
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Fathers's Educational Attainment</label> <?=$is_father_educ->checkbox?>
				<?=form_error('father_educ');?>
				<input class="<?=$is_father_educ->changed?$is_father_educ->class:''?>" type="text" name="father_educ" value="<?=$father_educ;?>" disabled>
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Father's Hobbies/Talent</label> <?=$is_father_talent->checkbox?>
				<?=form_error('father_talent');?>
				<input class="<?=$is_father_talent->changed?$is_father_talent->class:''?>" type="text" name="father_talent" value="<?=$father_talent;?>" disabled>
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Father's Occupation/Position</label> <?=$is_father_occup->checkbox?>
				<?=form_error('father_occup');?>
				<input class="<?=$is_father_occup->changed?$is_father_occup->class:''?>" type="text" name="father_occup" value="<?=$father_occup;?>" disabled>
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Father's Office Address</label> <?=$is_father_office_address->checkbox?>
				<?=form_error('father_office_address');?>
				<input class="<?=$is_father_office_address->changed?$is_father_office_address->class:''?>" type="text" name="father_office_address" value="<?=$father_office_address;?>">
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Father's Office Telephone Number</label> <?=$is_father_office_tel->checkbox?>
				<?=form_error('father_office_tel');?>
				<input class="<?=$is_father_office_tel->changed?$is_father_office_tel->class:''?>" type="text" name="father_office_tel" value="<?=$father_office_tel;?>">
			</div>
		</div>
		
		<div>
			<span class="clearfix"></span>
			<div class="alert-box secondary">Mother's Information</div>
			<span class="clearfix"></span>
			<div class="large-4 columns">
				<label class="radius secondary label">Mother's Full Name</label> <?=$is_mother_name->checkbox?>
				<?=form_error('mother_name');?>
				<input class="<?=$is_mother_name->changed?$is_mother_name->class:''?>" type="text" name="mother_name" value="<?=$mother_name;?>" disabled>
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Mother's Age</label> <?=$is_mother_age->checkbox?>
				<?=form_error('mother_age');?>
				<input class="<?=$is_mother_age->changed?$is_mother_age->class:''?>" type="text" name="mother_age" value="<?=$mother_age;?>" disabled>
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Mother's Citizenship</label> <?=$is_mother_citizenship->checkbox?>
				<?=form_error('mother_citizenship');?>
				<input class="<?=$is_mother_citizenship->changed?$is_mother_citizenship->class:''?>" type="text" name="mother_citizenship" value="<?=$mother_citizenship;?>" disabled>
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Mother's Educational Attainment</label> <?=$is_mother_educ->checkbox?>
				<?=form_error('mother_educ');?>
				<input class="<?=$is_mother_educ->changed?$is_mother_educ->class:''?>" type="text" name="mother_educ" value="<?=$mother_educ;?>" disabled>
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Mother's Hobbies/Talent</label> <?=$is_mother_talent->checkbox?>
				<?=form_error('mother_talent');?>
				<input class="<?=$is_mother_talent->changed?$is_mother_talent->class:''?>" type="text" name="mother_talent" value="<?=$mother_talent;?>" disabled>
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Mother's Occupation/Position</label> <?=$is_mother_occup->checkbox?>
				<?=form_error('mother_occup');?>
				<input class="<?=$is_mother_occup->changed?$is_mother_occup->class:''?>" type="text" name="mother_occup" value="<?=$mother_occup;?>" disabled>
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Mother's Office Address</label> <?=$is_mother_office_address->checkbox?>
				<?=form_error('mother_office_address');?>
				<input class="<?=$is_mother_office_address->changed?$is_mother_office_address->class:''?>" type="text" name="mother_office_address" value="<?=$mother_office_address;?>">
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Mother's Office Telephone Number</label> <?=$is_mother_office_tel->checkbox?>
				<?=form_error('mother_office_tel');?>
				<input class="<?=$is_mother_office_tel->changed?$is_mother_office_tel->class:''?>" type="text" name="mother_office_tel" value="<?=$mother_office_tel;?>">
			</div>
		</div>
		
		<div>
			<span class="clearfix"></span>
			<div class="alert-box secondary">Guardian's Information</div>
			<span class="clearfix"></span>
			<div class="large-4 columns">
				<label class="radius secondary label">Guardian's Full Name</label> <?=$is_guardian_name->checkbox?>
				<?=form_error('guardian_name');?> 
				<input class="<?=$is_guardian_name->changed?$is_guardian_name->class:''?>" type="text" name="guardian_name" value="<?=$guardian_name;?>" disabled>
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Relation To Child</label> <?=$is_guardian_relation->checkbox?>
				<?=form_error('guardian_relation');?>
				<input class="<?=$is_guardian_relation->changed?$is_guardian_relation->class:''?>" type="text" name="guardian_relation" value="<?=$guardian_relation;?>" disabled>
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Guardian's Address</label> <?=$is_guardian_address->checkbox?>
				<?=form_error('guardian_address');?>
				<input class="<?=$is_guardian_address->changed?$is_guardian_address->class:''?>" type="text" name="guardian_address" value="<?=$guardian_address;?>">
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Guardian's Contact Number</label> <?=$is_guardian_contact_num->checkbox?>
				<?=form_error('guardian_contact_num');?>
				<input class="<?=$is_guardian_contact_num->changed?$is_guardian_contact_num->class:''?>" type="text" name="guardian_contact_num" value="<?=$guardian_contact_num;?>">
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Reason for Need of Guardian</label> <?=$is_guardian_reason->checkbox?>
				<?=form_error('guardian_reason');?>
				<input class="<?=$is_guardian_reason->changed?$is_guardian_reason->class:''?>" type="text" name="guardian_reason" value="<?=$guardian_reason;?>" disabled>
			</div>
		</div>

	<?if($student->level_category):?>
	<!-- <div>
		<span class="clearfix"></span>
		<div class="alert-box secondary">Preschool Data.</div>
		<span class="clearfix"></span>
		<div>
			<div class="large-4 columns">
				<label class="radius secondary label">Age First Walked</label> <?=$is_age_first_walked->checkbox?>
				<?='<br>'.form_error('age_first_walked');?>
				<input class="<?=$is_age_first_walked->changed?$is_age_first_walked->class:''?>" type="text" name="age_first_walked" value="<?=set_value('age_first_walked',$age_first_walked);?>">
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Age First Talked</label> <?=$is_age_first_talked->checkbox?>
				<?='<br>'.form_error('age_first_talked');?>
				<input class="<?=$is_age_first_talked->changed?$is_age_first_talked->class:''?>" type="text" name="age_first_talked" value="<?=set_value('age_first_talked',$age_first_talked);?>">
			</div>
			<div class="large-4 columns"></div>
		</div>
		
		<div class="clearfix"></div>
		
		<div>
			<div class="large-4 columns">
				<label class="radius secondary label">Words Used For Urination</label> <?=$is_w_for_urinate->checkbox?>
				<?='<br>'.form_error('w_for_urinate');?>
				<input class="<?=$is_w_for_urinate->changed?$is_w_for_urinate->class:''?>" type="text" name="w_for_urinate" value="<?=set_value('w_for_urinate',$w_for_urinate);?>">
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Words Used For Bowel Movement?</label> <?=$is_w_for_bowel->checkbox?>
				<?='<br>'.form_error('w_for_bowel');?>
				<input class="<?=$is_w_for_bowel->changed?$is_w_for_bowel->class:''?>" type="text" name="w_for_bowel" value="<?=set_value('w_for_bowel',$w_for_bowel);?>">
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Usual Time</label> <?=$is_w_usual_time->checkbox?>
				<?='<br>'.form_error('w_usual_time');?>
				<input class="<?=$is_w_usual_time->changed?$is_w_usual_time->class:''?>" type="text" name="w_usual_time" value="<?=set_value('w_usual_time',$w_usual_time);?>">
			</div>
		</div>
		
		<div>
			<div class="large-6 columns">
				<label class="radius secondary label">Does Child Dress Self</label> <?=$is_child_dress->checkbox?>
				<?='<br>'.form_error('child_dress');?>
				<? $dd_class = $is_child_dress->changed ? $is_child_dress->class : '' ?>
				<?=form_dropdown('child_dress',array('no'=>'No','yes'=>'Yes'),set_value('child_dress',$child_dress), " class='$dd_class'");?>
			</div>
			<div class="large-6 columns">
				<label class="radius secondary label">Does Child Undress Self</label> <?=$is_child_undress->checkbox?>
				<? $dd_class = $is_child_undress->changed ? $is_child_undress->class : '' ?>
				<?='<br>'.form_error('child_undress');?>
				<?=form_dropdown('child_undress',array('no'=>'No','yes'=>'Yes'),set_value('child_undress',$child_undress), " class='$dd_class'");?>
			</div>
		</div>
		
		<div>
			<div class="large-4 columns">
				<label class="radius secondary label">Child Is </label> <?=$is_hand_orientation->checkbox?>
				<? $dd_class = $is_hand_orientation->changed ? $is_hand_orientation->class : '' ?>
				<?='<br>'.form_error('hand_orientation');?>
				<?=form_dropdown('hand_orientation',array('left-handed'=>'Left Handed','right-handed'=>'Right Handed'),set_value('hand_orientation',$hand_orientation), " class='$dd_class'");?>
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Does Child Self Feed</label> <?=$is_self_feed->checkbox?>
				<? $dd_class = $is_self_feed->changed ? $is_self_feed->class : '' ?>
				<?='<br>'.form_error('self_feed');?>
				<?=form_dropdown('self_feed',array('no'=>'No','yes'=>'Yes'),set_value('self_feed',$self_feed), " class='$dd_class'");?>
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Does Child stay in place while eating?</label> <?=$is_stayinplace->checkbox?>
				<? $dd_class = $is_stayinplace->changed ? $is_stayinplace->class : '' ?>
				<?='<br>'.form_error('stayinplace');?>
				<?=form_dropdown('stayinplace',array('no'=>'No','yes'=>'Yes'),set_value('stayinplace',$stayinplace), " class='$dd_class'");?>
			</div>
		</div>
		
		<div>
			<div class="large-4 columns">
				<label class="radius secondary label">Join Other Family Members When eating?</label> <?=$is_joinothereating->checkbox?>
				<? $dd_class = $is_joinothereating->changed ? $is_joinothereating->class : '' ?>
				<?='<br>'.form_error('joinothereating');?>
				<?=form_dropdown('joinothereating',array('no'=>'No','yes'=>'Yes'),set_value('joinothereating',$joinothereating), " class='$dd_class'");?>
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Food Preferences</label> <?=$is_food_preferences->checkbox?>
				<?='<br>'.form_error('food_preferences');?>
				<input class="<?=$is_food_preferences->changed?$is_food_preferences->class:''?>" type="text" name="food_preferences" value="<?=set_value('food_preferences',$food_preferences);?>">
			</div>
			<div class="large-4 columns">
				<label class="radius secondary label">Does Child still drink from the bottle?</label><?=$is_drink_from_bottle->checkbox?>
				<? $dd_class = $is_drink_from_bottle->changed ? $is_drink_from_bottle->class : '' ?>
				<?='<br>'.form_error('drink_from_bottle');?>
				<?=form_dropdown('drink_from_bottle',array('no'=>'No','yes'=>'Yes'),set_value('drink_from_bottle',$drink_from_bottle), " class='$dd_class'");?>
			</div>
		</div>
		
		<div>
			<div class="large-4 columns">
				<label class="radius secondary label">Is the Child Toilet Trained</label><?=$is_toilet_trained->checkbox?>
				<? $dd_class = $is_toilet_trained->changed ? $is_toilet_trained->class : '' ?>
				<?='<br>'.form_error('toilet_trained');?>
				<?=form_dropdown('toilet_trained',array('no'=>'No','yes'=>'Yes'),set_value('toilet_trained',$toilet_trained));?>
			</div>
		</div>
	</div> -->
	<?endif;?>
		<!-- End of personal information -->
	</div>
	

	<?if(isset($student->edit) && $student->edit === 1):?>
			<div>
				<input type="hidden" name="profile_id" value="<?=$student->profile_id;?>">
				<input type="hidden" name="enrollment_id" value="<?=$student->enrollment_id;?>">
				<input type="hidden" name="update_personal_profile" value="true">
				<input type="submit" name="update_personal_profile" value="Update Student Personal Information" class="btn btn-primary">
			</div>
	<?endif;?>

	</form>
</div>
<?php else:?>
	<div class="alert-box">
		<h1>Invalid student.</h1>
	</div>
<?php endif;?>